
<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
   pageEncoding="UTF-8"%>
   <%@ page import="ssi.beans.User" %>

<%
User user=(User)session.getAttribute("user");
String name=user.getName();
String surname=user.getSurname();
String email=user.getEmail();
String address=user.getAddress();
%>


<h2>Edytuj konto:</h2>
<html:form action="editAccount">
<table>
		<tr>
		<td><p>Email:</td> <td><input id="email" name="email" type="text" value=<%=email %> /></td>
		</tr>
		
		<tr>
		<td><p>Imię:</td> <td><input id="name" name="name" type="text" value=<%=name %> /></td> 
		</tr>
		
		<tr>
		<td><p>Nazwisko:</td> <td><input id="surname" name="surname" type="text" value=<%=surname %> /></td> 
		</tr>
		
		<tr>
		<td><p>Adres:</td> <td><input id="address" name="address" type="text" value=<%=address %> /></td> 
		</tr>
		
		<tr>
		<td><p>Hasło do konta:</td> <td><input id="password" name="password" type="password" /></td> 
		</tr>
		
		</table> 
		<center><input type="submit" class="submit" value="Zmien"/>
		<font color="red"><html:errors property="error" /></font></center>
</html:form>
<br>
<h2>Usun konto:</h2>

<html:form action="confirmDeleteAccount">
		<center><input type="submit" value="Usun konto" class="submit"/><br>
		<font color="green"><html:errors property="info" /></font></center>
</html:form>